package flexibility;

import java.io.Serializable;
import java.util.ArrayList;

public class userData implements Serializable {

	ArrayList<Object> data = new ArrayList<Object>();

	// add data to the object list
	public void addData(Object record) {
		data.add(record);
	}

	// read data from the object list
	public Object getData(int index) {
		return data.get(index);
	}

	// get how many objects are in the list
	public int getLength() {
		return data.size();
	}

	// delete all objects in the list
	public void deleteAll() {
		data.removeAll(data);
	}

	// check whether the list is empty or not
	public boolean isEmpty() {
		return data.isEmpty();
	}
}
